var xmlhttp;

function loadXMLDoc(url) {
	xmlhttp = null;
	if (window.XMLHttpRequest) {// code for all new browsers
		xmlhttp = new XMLHttpRequest();
	}
	if (xmlhttp != null) {
		xmlhttp.onreadystatechange = state_Change;
		xmlhttp.open("GET", url, true);
		xmlhttp.send(null);
	}
}

function state_Change() {
	if (xmlhttp.readyState == 4) {// 4 = "loaded"
		if (xmlhttp.status == 200) {// 200 = OK			
			var json = eval(xmlhttp.responseText);
			console.log(json);
			var url = json.wma;
			window.open(url, "_blank");
		} else {
	    	console.log(xmlhttp.status);
		}
  	}
}

var url = window.location.href;
console.log(url);
var id = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.'));
console.log(id);
url = 'https://www.9ku.com/html/playjs/1001/' + id + '.js';
console.log(url);
loadXMLDoc(url);